package user;

import server.Connector;
import util.Message;
import businessLogicService.AdministratorBLService;
import dataPO.CoursePO;

public class Administrator extends User implements AdministratorBLService {

	public Administrator(String ID, String password) {
		super(ID, password);
		
	}
	
	@Override
	public Message modifyTeachFrame() {
		return null;//Connector.update(frame);
	}

	@Override
	public Message publishTeachFrame() {
		return null;//Connector.add(frame);
	}

	@Override
	public Message publishCourse(CoursePO info) {
		return Connector.add(info);
	}

	@Override
	public Message showTeachers() {
		return Connector.getUsersBy("Teacher");
	}

	@Override
	public Message showStudents() {
		return Connector.getUsersBy("Student");
	}

	@Override
	public Message showTeachPlan(String department) {
		return Connector.getTeachPlan(department);
	}

	@Override
	public Message showCourseStudent(String courseID) {
//		// TODO Auto-generated method stub
//		String[][] temp = Data_Stub.getCourseStudentRecord(courseID);
//		UserPO[] list = new UserPO[temp.length];
//		for(int i = 0; i < temp.length; i++) {
//			list[i] = Data_Stub.getAccountInfo(temp[i][0]);
//		}
//		return new Message("success", list);
	    return Connector.getCourseStudentRecord(courseID);
	}
//
//	@Override
//	public Message showStudentsByDepartment(String department) {
//		return Connector.getUsersBy(department);
//	}
//
//	@Override
//	public Message showTeachersByDepartment(String department) {
////		// TODO Auto-generated method stub
////		UserPO[] temp = Data_Stub.getTeacherByDepartment(department);
////		return new Message("success", temp);
//	    return Connector.getUsersBy(department);
//	}

}
